home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / diverses / cexpress / keyboard / altdown.asm next >
Encoding:
Assembly Source File  |  1989-05-03  |  505 b   |  23 lines

  1. ;unsigned short  alt_key_down();
  2.  
  3.     EXTRN  _memory_model:byte
  4.  
  5. _TEXT    SEGMENT BYTE PUBLIC 'CODE'
  6.     ASSUME CS:_TEXT
  7.     PUBLIC _alt_key_down
  8. _alt_key_down proc near
  9.     mov  ah,2        ;BIOS kybd status func
  10.     int  16h        ;call the interrupt
  11.     mov  bx,1        ;TRUE value
  12.     test al,8        ;test bit 3
  13.     jnz  L1            ;jump if TRUE
  14.     mov  bx,0        ;FALSE value
  15. L1:    mov  ax,bx        ;place value for return
  16.     cmp  _memory_model,0    ;quit
  17.     jle  quit        ;
  18.     db   0CBh        ;RET far
  19. quit:    ret            ;RET near
  20. _alt_key_down ENDP
  21. _TEXT    ENDS
  22.     END
  23.